package com.example.malltest0.controller;


import com.example.malltest0.Vo.HotVo;
import com.example.malltest0.common.api.CommonResult;
import com.example.malltest0.service.HotService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

@Controller
@RequestMapping("/hot")
@Api(tags = "HotController", description = "热点管理")
public class HotController {

    @Autowired
    private HotService hotService;

    @ResponseBody
    @RequestMapping(value = "/get",method = RequestMethod.GET)
    @ApiOperation("获取热点")
    public CommonResult< List<List<String>>> getHot(){
        List<List<String>>res=hotService.getHot();
        return CommonResult.success(res);
    }
}
